package thread;

/**
 * demo01
 *
 * @author dingwen
 * @date 2021/09/05
 */
public class Demo01 extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("新线程执行第：" + i + "次");
        }
    }

    public static void main(String[] args) {
        new Demo01().start();
        for (int i = 0; i < 2000; i++) {
            System.out.println("main线程执行第" + i + "次");
        }
    }

    // 结果： 新线程和main线程交叉执行
}
